Optimal. Leaf size=63 \[ -\frac {3 b \text {ArcTan}(\sinh (c+d x))}{2 d}+\frac {a \cosh (c+d x)}{d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {3747, 2718,
2672, 294, 327, 209} \begin {gather*} \frac {a \cosh (c+d x)}{d}-\frac {3 b \text {ArcTan}(\sinh (c+d x))}{2 d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 294
Rule 327
Rule 2672
Rule 2718
Rule 3747
Rubi steps
\begin {align*} \int \sinh (c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx &=-\left (i \int \left (i a \sinh (c+d x)+i b \sinh (c+d x) \tanh ^3(c+d x)\right ) \, dx\right )\\ &=a \int \sinh (c+d x) \, dx+b \int \sinh (c+d x) \tanh ^3(c+d x) \, dx\\ &=\frac {a \cosh (c+d x)}{d}+\frac {b \text {Subst}\left (\int \frac {x^4}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=\frac {a \cosh (c+d x)}{d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d}+\frac {(3 b) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{2 d}\\ &=\frac {a \cosh (c+d x)}{d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d}-\frac {(3 b) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{2 d}\\ &=-\frac {3 b \tan ^{-1}(\sinh (c+d x))}{2 d}+\frac {a \cosh (c+d x)}{d}+\frac {3 b \sinh (c+d x)}{2 d}-\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 72, normalized size = 1.14 \begin {gather*} \frac {a \cosh (c) \cosh (d x)}{d}+\frac {a \sinh (c) \sinh (d x)}{d}+\frac {b \sinh (c+d x) \tanh ^2(c+d x)}{d}-\frac {3 b (\text {ArcTan}(\sinh (c+d x))-\text {sech}(c+d x) \tanh (c+d x))}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 2.19, size = 125, normalized size = 1.98
method | result | size |
risch | \(\frac {a \,{\mathrm e}^{d x +c}}{2 d}+\frac {b \,{\mathrm e}^{d x +c}}{2 d}+\frac {{\mathrm e}^{-d x -c} a}{2 d}-\frac {{\mathrm e}^{-d x -c} b}{2 d}+\frac {b \,{\mathrm e}^{d x +c} \left ({\mathrm e}^{2 d x +2 c}-1\right )}{d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{2}}+\frac {3 i b \ln \left ({\mathrm e}^{d x +c}-i\right )}{2 d}-\frac {3 i b \ln \left ({\mathrm e}^{d x +c}+i\right )}{2 d}\) | \(125\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 105, normalized size = 1.67 \begin {gather*} \frac {1}{2} \, b {\left (\frac {6 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} - \frac {e^{\left (-d x - c\right )}}{d} + \frac {4 \, e^{\left (-2 \, d x - 2 \, c\right )} - e^{\left (-4 \, d x - 4 \, c\right )} + 1}{d {\left (e^{\left (-d x - c\right )} + 2 \, e^{\left (-3 \, d x - 3 \, c\right )} + e^{\left (-5 \, d x - 5 \, c\right )}\right )}}\right )} + \frac {a \cosh \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 528 vs.
\(2 (57) = 114\).
time = 0.35, size = 528, normalized size = 8.38 \begin {gather*} \frac {{\left (a + b\right )} \cosh \left (d x + c\right )^{6} + 6 \, {\left (a + b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{5} + {\left (a + b\right )} \sinh \left (d x + c\right )^{6} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 3 \, {\left (5 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + b\right )} \sinh \left (d x + c\right )^{4} + 4 \, {\left (5 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (a + b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{3} + 3 \, {\left (a - b\right )} \cosh \left (d x + c\right )^{2} + 3 \, {\left (5 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{4} + 6 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a - b\right )} \sinh \left (d x + c\right )^{2} - 6 \, {\left (b \cosh \left (d x + c\right )^{5} + 5 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + b \sinh \left (d x + c\right )^{5} + 2 \, b \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, b \cosh \left (d x + c\right )^{2} + b\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, b \cosh \left (d x + c\right )^{3} + 3 \, b \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + b \cosh \left (d x + c\right ) + {\left (5 \, b \cosh \left (d x + c\right )^{4} + 6 \, b \cosh \left (d x + c\right )^{2} + b\right )} \sinh \left (d x + c\right )\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) + 6 \, {\left ({\left (a + b\right )} \cosh \left (d x + c\right )^{5} + 2 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{3} + {\left (a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + a - b}{2 \, {\left (d \cosh \left (d x + c\right )^{5} + 5 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{4} + d \sinh \left (d x + c\right )^{5} + 2 \, d \cosh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )^{3} + 2 \, {\left (5 \, d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right )^{2} + d \cosh \left (d x + c\right ) + {\left (5 \, d \cosh \left (d x + c\right )^{4} + 6 \, d \cosh \left (d x + c\right )^{2} + d\right )} \sinh \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \sinh {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 86, normalized size = 1.37 \begin {gather*} -\frac {6 \, b \arctan \left (e^{\left (d x + c\right )}\right ) - a e^{\left (d x + c\right )} - b e^{\left (d x + c\right )} - {\left (a - b\right )} e^{\left (-d x - c\right )} - \frac {2 \, {\left (b e^{\left (3 \, d x + 3 \, c\right )} - b e^{\left (d x + c\right )}\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.14, size = 128, normalized size = 2.03 \begin {gather*} \frac {{\mathrm {e}}^{-c-d\,x}\,\left (a-b\right )}{2\,d}-\frac {3\,\mathrm {atan}\left (\frac {b\,{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {d^2}}{d\,\sqrt {b^2}}\right )\,\sqrt {b^2}}{\sqrt {d^2}}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (a+b\right )}{2\,d}+\frac {b\,{\mathrm {e}}^{c+d\,x}}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {2\,b\,{\mathrm {e}}^{c+d\,x}}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________